package calendar.commands.calendar;

import calendar.commands.ClientCommand;
import calendar.model.CalendarModel;
import com.google.api.services.calendar.Calendar;
import com.google.api.services.calendar.model.CalendarList;

public class ReadCalendars extends ClientCommand {
    public ReadCalendars(Calendar client) {
        super(client);
    }

    @Override
    protected void protectedExecute() throws Exception {
        CalendarList feed = client.calendarList().list().execute();
        CalendarModel.CALENDARS.notifyObservers(feed);
    }
}
